import { createStore } from 'vuex'

export default createStore({
  state: {
    isLogin:false,
    //actionSheet的配置
    actionSheetConfig:{
      isShow:false,
      list:[],
      successCallBack:null,
    },
    userInfo:{},
    token:''
  },
  mutations: {
    setUserInfo(state,data){

    },
    setToken(state,data){
      
    },
    showActionSheet(state,config){
      state.actionSheetConfig.isShow=true;
      state.actionSheetConfig.list=config.list;
      state.actionSheetConfig.successCallBack=config.successCallBack
    },
    hideActionSheet(state){
      state.actionSheetConfig.isShow=false;
      state.actionSheetConfig.list=[];
      state.actionSheetConfig.successCallBack=null
    }
  },
  actions: {
  },
  modules: {
  }
})
